﻿


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApp1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window, INotifyPropertyChanged
    {
        private Visibility _visib=Visibility.Collapsed;

        public event PropertyChangedEventHandler? PropertyChanged;
        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
        public Visibility visib
        {
            get => _visib;
            set
            {
                if(value != _visib)
                {
                    _visib = value;
                    OnPropertyChanged(nameof(visib));
                }
            }
        }
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
        }

        private async void Window_LoadedAsync(object sender, RoutedEventArgs e)
        {
            await Task.Run(() => {
                Thread.Sleep(5000);
                //MessageBox.Show("111");
                //this.DataContext = this;
            });
        }


        private void Window_Unloaded(object sender, RoutedEventArgs e)
        {

        }

    }
}
